import { RouteRecordRaw } from "vue-router";
import { DashboardBreadcrumb } from "./dashboard";

const breadcrumbList = [DashboardBreadcrumb, { name: "权限管理", i18n: "routes.PERMISSION" }];

const permissionRoutes: RouteRecordRaw[] = [
  {
    path: "/user",
    name: "User",
    component: () => import("@/views/permission/user/user.vue"),
    meta: {
      title: "用户",
      isKeepAlive: true,
      breadcrumbList: [...breadcrumbList, { name: "用户", i18n: "routes.USER" }],
      icon: "icon-yonghu",
      i18n: "routes.USER",
    },
  },

  {
    path: "/role",
    name: "Role",
    component: () => import("@/views/permission/role/role.vue"),
    meta: {
      title: "角色",
      isKeepAlive: true,
      breadcrumbList: [...breadcrumbList, { name: "角色", i18n: "routes.ROLE" }],
      icon: "icon-jiaoseliebiao",
      i18n: "routes.ROLE",
    },
  },
];

export default permissionRoutes;
